<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
							<input id="userId" name="userId" type="hidden">
							<div class="form-group">
								<label class="col-sm-3 control-label"><em class="gg-star">*</em>姓名:</label>
								<div class="col-sm-8">
									<input id="nickname" name="nickname" class="form-control" type="text">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label"><em class="gg-star">*</em>用户名:</label>
								<div class="col-sm-8">
									<input id="name" name="name" class="form-control" type="text">
								</div>
							</div>

							<input type="hidden" name="centreId" th:value="${centreId}" th:if="${flag} == '1'">
							<div class="form-group" th:if="${flag} == '0'">
								<label class="col-sm-3 control-label">商户:</label>
								<div class="col-sm-8">
									<select name="centreId" class="form-control" type="text">
										<option value="" selected="selected">--请选择--</option>
										<option th:each="item: ${centreList}" th:text="${item.name}" th:value="${item.centreId}"></option>
									</select>
								</div>
							</div>
							<div class="form-group" th:if="${flag} == '1'">
								<label class="col-sm-3 control-label">门店:</label>
								<div class="col-sm-8">
									<select name="teamId" class="form-control" type="text">
										<option value="" selected="selected">--请选择--</option>
										<option th:each="item: ${teamList}" th:text="${item.tXiaoqu}" th:value="${item.id}"></option>
									</select>
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label"><em class="gg-star">*</em>密码:</label>
								<div class="col-sm-8">
									<input id="password" name="password" class="form-control" type="password">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label"><em class="gg-star">*</em>确认密码:</label>
								<div class="col-sm-8">
									<input id="confirmPassword" name="confirmPassword" class="form-control" type="password">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label"><em class="gg-star">*</em>E-mail:</label>
								<div class="col-sm-8">
									<input id="email" name="email" class="form-control" type="email">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">手机号码:</label>
								<div class="col-sm-8">
									<input id="phone" name="phone" class="form-control" type="text">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">状态:</label>
								<div class="col-sm-8">
									<label class="radio-inline"> <input type="radio" name="status" value="1" checked/> 正常</label>
									<label class="radio-inline"> <input type="radio" name="status" value="0" /> 禁用</label>
								</div>
							</div>
							<input type="hidden" name="roleIds" id="roleIds">
							<div class="form-group">
								<label class="col-sm-3 control-label">角色</label>
								<div class="col-sm-8">
									<label th:each="role:${roles}" class="checkbox-inline">
										<input name="role" type="checkbox" th:value="${role.roleId}" th:text="${role.roleName}">
									</label>
								</div>
							</div>
							<div class="form-group text-center">
								<div class="col-sm-8 col-sm-offset-2">
									<button type="submit" class="btn btn-primary"><i class="fa fa-check"></i>提交</button>
									<div class="btn btn-danger" onclick="closeDow()"><i class="fa fa-remove"></i> 关闭</div>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>

	</div>
	<div th:include="include::footer"></div>
	<script type="text/javascript">
		function closeDow() {
			var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
			parent.layer.close(index);
		}
	</script>
	<script type="text/javascript" src="/js/appjs/sys/user/add.js">
	</script>
</body>
</html>
